import { createRouter, createWebHistory } from 'vue-router'
import LoginView from '../views/LoginView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'login',
      component: LoginView
    },
    {
      path: '/MainView',
      name: 'MainView',
      component: () => import('../views/MainView.vue'),
      children: [
        {
          path: '/ProductCreate',
          name: 'ProductCreate',
          component: () => import('../views/Companymanage/ProductCreate.vue')
        },
        {
          path: '/Detail',
          name: 'Detail',
          component: () => import('../views/Companymanage/Detail.vue')
        }
      ]
    },


  ]
})




export default router
